package com.usian.article.controller.v1;

import com.usian.apis.article.ApArticleControllerApi;
import com.usian.article.service.ApArticleService;
import com.usian.model.article.pojo.ApArticle;
import com.usian.model.article.pojo.dto.ArticleInfoDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/article/api/v1/article")
public class ApArticleController implements ApArticleControllerApi {
@Autowired
private ApArticleService apArticleService;
@PostMapping("/saveArticle")
    @Override
    public ApArticle saveArticle(@RequestBody ApArticle apArticle) {
    System.out.println(apArticle+"----------------------------------------");
    apArticleService.save(apArticle);
    System.out.println(apArticle+"----------1111111---------------------------");
        return apArticle;
    }

    @Override
    public ResponseResult loadByid(ArticleInfoDto dto) {
        return null;
    }
}
